import request from '../../utils/request'

//根据条件查询指定教师下的所有课程成绩
export function resultByTeacherId(teacherId, isNull, classId, studentName) {
  return request({
    url: `/edm/result/resultByTeacherId`,
    method: 'post',
    data: {
      teacherId: teacherId,
      isNull: isNull,
      classId: classId,
      studentName: studentName
    }
  })
}

//根据教师ID查询教授的班级信息
export function classInfoByTeacherId(teacherId) {
  return request({
    url: `/edm/result/classInfoByTeacherId/${teacherId}`,
    method: 'get',
    params: {}
  })
}

//批阅成绩
export function updateResult(id, result) {
  return request({
    url: `/edm/result/update`,
    method: 'post',
    data: {
      id,
      result
    }
  })
}

